<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
// load tooltip behavior
JHtml::_('behavior.tooltip');
$css = JURI::root(false)."components/com_nrmresearch/resources/css/style.css";
$images_path = JURI::root(false)."components/com_nrmresearch/resources/images/";
$doc =& JFactory::getDocument();
$doc->addStyleSheet($css);
$item = $this->item;

//Social shareing url
$url = 'http://'.$_SERVER["HTTP_HOST"].JRoute::_ ( 'index.php?option=com_nrmresearch&Itemid='.PUBLICATIONS_MENUID.'&view=publication&id=', false );
$shareUrl = urlencode($url);

//For print-email action
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$app = JFactory::getApplication();
$params = $app->getParams();
$isPrint = JRequest::getVar('print',0);
//Print action icon
if($isPrint) echo JHtml::_('icon.print_screen',  $this->item, $params);


?>

<h1 style="color: #0082c8;" class="category-name">Current Research</h1>
<p style="background-color: #d4e4f5; color:#0082c8;" class="category-description"><strong>Research projects currently being undertaken at the universities and South Australian Government. 
Are you interested in finding out more? The chief investigator's contact details are listed under the project.</strong></p>
<div id = "result" class="result" style="float:right; width: 945px;">
<?php 
if($item->id <1){
	echo "Sorry, no results were found.";
}
else{?>	
		<div id="result-head>" class="result-head ">
			<h3><strong><?php echo $item->title;?></strong></h3>			
			<br>
			<label><strong>Period of funding:</strong></label><label class="grey"><?php  echo $item->period_of_funding;?></label>						
		</div>
		
		<div id="result-body" class="result-body">
			<label><strong>Chief investigator/s:</strong><?php echo $item->chief_investigator;?> </label>
			<br>
			<br>
			<label><strong>Lead Organisation</strong></label>
			<p><?php echo $item->lead_organisation;?></p>
			<label><strong>Partner Organisation/s</strong></label>			
			<p><?php echo $item->partner_organisation_s;?></p>
			<label><strong>Summary of project</strong></label>			
			<p><?php echo $item->summary;?></p>
			<label><strong>Contact</strong></label>			
			<p><?php echo $item->contact;?></p>
			<p><?php echo $item->phone;?></p>
			<p><?php echo $item->email;?></p>
			<label><strong>Keywords</strong></label>			
			<p><?php echo $item->keywords;?></p>
		</div>
		
		<div id="result-foot" class="result-foot">
			<span class="sharethis">Share this article</span>
			<a href="https://twitter.com/intent/tweet?text=<?php echo $shareUrl.$item->id;?>"><img src="<?php echo $images_path;?>twitter.png" /></a>
			<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $shareUrl.$item->id;?>"><img src="<?php echo $images_path;?>face.png" /></a>
			<!-- <a href="https://plus.google.com/share?url=<?php echo $shareUrl.$item->id;?>"><img src="<?php echo $images_path;?>gplus.png" /></a>
			<?php $urlIn = $shareUrl.$item->id.'&title='.$item->title;?>
			<a href="http://www.linkedin.com/shareArticle?url=<?php echo $urlIn;?>"><img src="<?php echo $images_path;?>in.png" /></a>
			<a href="http://digg.com/submit?url=<?php echo $shareUrl.$item->id;?>"><img src="<?php echo $images_path;?>digg.png" /></a> -->
			<?php /*<img src="<?php echo $images_path;?>seperator.png" />*/?>
			<?php echo JHtml::_('icon.print_popup', $this->item, $params,null,$url.$item->id); ?>
			<?php echo JHtml::_('icon.email',  $this->item, $params); ?>
			
		</div>	
		<div class="clear both"></div>
	<?php 
}
?>
</div>
